<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <fmt:setBundle basename="ApplicationMessage" />
  <fmt:setLocale value="zh_CN" />

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  <link href="${ctx.resource}/css/select2.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
  <title>用户列表- 租房宝金融管理平台</title>
</head>
<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <div class="web-g-main">

    <%@ include file="/WEB-INF/include/aside.jsp"%>
    <div class="content">
      <header class="header clearfix">
	          <h3 class="pull-left">用户列表</h3>
	          <%-- <div class="btn-toolbar pull-right">
	            <div class="btn-group">
	                <a href="${ctx}/payment/waiting/search" class="btn btn-default btn-shadow btn-shadow-default demo2do-btn" data-target="#" data-toggle="modal" title="过滤查询"><i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询</a>
	            </div>
	          </div> --%>
	       </header>
	       <ul class="nav nav-tabs color-tabs">
	         <li><a href="${ctx}/authority-control" class="unsettlement-tab" >权限分配</a></li>
	         <li><a href="${ctx}/create-user-role" class="settlement-tab">创建用户</a></li>
	       	<li><a href="${ctx}/internal-user-role" class="settlement-tab">创建内部成员用户</a></li>
	         <li class="active"><a href="javascript:void(0)" class="unsettlement-tab">用户列表</a></li>
	       </ul>

       <c:if test="${not empty infoMessage}">
            <div class="alert alert-success alert-dismissable alert-fade top-margin-10 text-align-center">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
              <i class="glyphicon glyphicon-info-sign"></i>&nbsp;&nbsp;
              <fmt:message key="${infoMessage}" />
            </div>
       </c:if>

       <div class="table-area table-responsive" style="margin-top:10px;">
           <table class="data-list  table table-striped table-hover">
              <thead>
                <tr>
                 <th>用户id</th>
                  <th>权限名称</th>
                  <th>所属公司</th>
                  <th>用户名</th>
                </tr>
              </thead>
              <tbody>
                <c:forEach var="role" items="${roleList}" varStatus = "status">
                  <tr>                 
                    <td>${role.id}</td>
                    <td>${role.authority}</td>
                    <td>${role.companyName}</td>
                    <td>${role.name}</td>
                    <%-- <td>
                      <a href="${ctx}/logs/${order.id}/detail">详情</a>
                    </td> --%>
                  </tr>
                </c:forEach>
              </tbody>
           </table>
           
            <c:choose>
            <c:when test="${not empty queryString}">
              <jsp:include page="/WEB-INF/include/page.jsp">
                <jsp:param value="show-user-list" name="url" />
                <jsp:param name="queryString" value="${queryString}" />
              </jsp:include>
            </c:when>
            <c:otherwise>
              <jsp:include page="/WEB-INF/include/page.jsp">
                  <jsp:param value="show-user-list" name="url" />
              </jsp:include>
            </c:otherwise>
          </c:choose>

       </div>
       <%@ include file="/WEB-INF/include/footer.jsp"%>
       
    </div>

  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  <script src="${ctx.resource}/js/bootstrap-switch.min.js"></script>
  <script src="${ctx.resource}/js/bootstrap-modal-trigger.js"></script>
  <script src="${ctx.resource}/js/select2.min.js"></script>
  <script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.en.js"></script>
  <script src="${ctx.resource}/js/earth-preupload.js"></script>
  <script src="${ctx.resource}/js/bootstrap-alert-fade-trigger.js"></script>
</body>
</html>
